package com.jly.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jly.controller.dto.UserDTO;
import com.jly.controller.dto.UserPasswordDTO;
import com.jly.entity.User;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


public interface IUserService extends IService<User> {
    // 分页查询
    Page<User> search(String username,String email,String address, int pageNum, int pageSize);
    // 新增或修改（更新）
    boolean saveUser(User user);
    // 删除
    boolean delete(int id);
    // 登录
    UserDTO login(UserDTO userDTO,HttpServletResponse response);
    // 注册
    User register(UserDTO userDTO);
    // 修改密码
    void UpdatePassword(UserPasswordDTO userPasswordDTO);

    Page<User> findPage(Page<User> objectPage, String username, String email, String address);



}
